package com.service.impl;

import com.mapper.EmpMapper;
import com.pojo.TabEmp;
import com.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {

    final EmpMapper empMapper;

    @Autowired
    public EmpServiceImpl(EmpMapper empMapper) {
        this.empMapper = empMapper;
    }

    @Override
    public List<TabEmp> empAll() {
        return empMapper.empAll();
    }

    @Override
    public TabEmp empById(Integer id) {
        return empMapper.empById(id);
    }

    @Override
    public Integer empUpdate(TabEmp emp) {
        return empMapper.empUpdate(emp);
    }

    @Override
    public Integer empDeleteById(Integer id) {
        return empMapper.empDeleteById(id);
    }

    @Override
    public Integer empDelete(Integer[] id) {
        return empMapper.empDelete(id);
    }

    @Override
    public Integer empInsert(TabEmp emp) {
        return empMapper.empInsert(emp);
    }
}
